20210407: J’ai aouté la date car j’ai retiré les analyses de condition physique étant donné que le type de données qu’on utilise comme variable réponse ne correspond pas vraiment temporellement.

20210415:J’ai encore modifié la date du document, car je veux comparer les modèles avec et sans la longueur standard, qui est un possible downstream effect.

20210602: J’ai retiré les analyses par modèles mixtes pours les questions 2 & 3, et pour la question 1, j’ai retiré la procédure de sélection de modèle.

Préparation des données

 

Méthode de catégorisation des proies :

 

Préparation des données par région d’échantillonnage.

## Using region_year as value column: use value.var to override.

 

Exploration préliminaire

 

Question 1. FS ~ taille + environnement

 

Concernant les mesures de taille spécifiquement, on utilisera les variables log-transformées.

On fera de même avec la mesure de succès alimentaire (feeding_success).

 

#--- Ajoute les valeurs log-transformées

dfish$log_carbon_mg           <- log10( dfish$carbon_mg )
dfish$log_est_standard_length <- log10( dfish$est_standard_length )
dfish$log_feeding_success     <- log10( dfish$feeding_success )


#--- Taille des poissons

# Distribution par région
par( mar = c(6,4,0,0) )
plot( log_est_standard_length ~ region, 
      data = dfish,
      xlab = "",
      las  = 2 )

# Couverture spatio-temporelle d'échantillonnage
tapply( dfish$est_standard_length,
        INDEX = list( dfish$region, dfish$year ), 
        FUN   = mean )
##                                   2009     2010     2011     2014     2015
## Mackenzie Shelf                12.6857 27.09488       NA 35.40000 31.54290
## Amundsen Gulf Mouth                 NA       NA       NA       NA 32.85720
## Coronation Maud                     NA       NA 15.59700       NA       NA
## Larsen Sound - Victoria Strait      NA 11.30658       NA       NA       NA
## Peel Sound                          NA 10.81823 17.42556 12.13674 11.36489
## Lancaster Sound                     NA 13.23085 13.62750       NA 16.59357
## North Water                         NA       NA       NA 17.73251       NA
## West Baffin Bay                     NA       NA       NA       NA 14.48783
## NEG                                 NA       NA       NA       NA       NA
##                                    2016     2017     2018
## Mackenzie Shelf                      NA       NA       NA
## Amundsen Gulf Mouth                  NA       NA       NA
## Coronation Maud                22.55682 16.26570 14.98442
## Larsen Sound - Victoria Strait 14.74777       NA 11.03090
## Peel Sound                     12.85020       NA       NA
## Lancaster Sound                17.96064 15.33450       NA
## North Water                    20.41569       NA 21.30636
## West Baffin Bay                11.19310       NA       NA
## NEG                                  NA 19.12333       NA
#--- Taille et environnement

dfish %>% select( log_est_standard_length,
                  sampling_day,
                  open_water_day,
                  prof_mel,
                  surf_sal_kgm3,
                  surf_temp_degC,
                  NASC_zoo ) %>% plot

# Corrélations avec les variables explicatives potentielles
rcorr( as.matrix( dfish[, c( "log_est_standard_length",
                             "sampling_day",
                             "open_water_day",
                             "prof_mel",
                             "surf_sal_kgm3",
                             "surf_temp_degC",
                             "NASC_zoo" ) ]
                 ) 
      )
##                         log_est_standard_length sampling_day open_water_day
## log_est_standard_length                    1.00         0.40           0.56
## sampling_day                               0.40         1.00           0.23
## open_water_day                             0.56         0.23           1.00
## prof_mel                                  -0.01         0.10          -0.01
## surf_sal_kgm3                              0.18        -0.16           0.46
## surf_temp_degC                             0.47         0.04           0.36
## NASC_zoo                                   0.28        -0.02           0.46
##                         prof_mel surf_sal_kgm3 surf_temp_degC NASC_zoo
## log_est_standard_length    -0.01          0.18           0.47     0.28
## sampling_day                0.10         -0.16           0.04    -0.02
## open_water_day             -0.01          0.46           0.36     0.46
## prof_mel                    1.00          0.33          -0.36    -0.04
## surf_sal_kgm3               0.33          1.00          -0.17     0.24
## surf_temp_degC             -0.36         -0.17           1.00     0.56
## NASC_zoo                   -0.04          0.24           0.56     1.00
## 
## n= 339 
## 
## 
## P
##                         log_est_standard_length sampling_day open_water_day
## log_est_standard_length                         0.0000       0.0000        
## sampling_day            0.0000                               0.0000        
## open_water_day          0.0000                  0.0000                     
## prof_mel                0.8256                  0.0652       0.8615        
## surf_sal_kgm3           0.0010                  0.0027       0.0000        
## surf_temp_degC          0.0000                  0.4248       0.0000        
## NASC_zoo                0.0000                  0.7638       0.0000        
##                         prof_mel surf_sal_kgm3 surf_temp_degC NASC_zoo
## log_est_standard_length 0.8256   0.0010        0.0000         0.0000  
## sampling_day            0.0652   0.0027        0.4248         0.7638  
## open_water_day          0.8615   0.0000        0.0000         0.0000  
## prof_mel                         0.0000        0.0000         0.4629  
## surf_sal_kgm3           0.0000                 0.0017         0.0000  
## surf_temp_degC          0.0000   0.0017                       0.0000  
## NASC_zoo                0.4629   0.0000        0.0000
# La corrélation maximale est avec "open_water_day"
plot( est_standard_length ~ open_water_day,
      data = dfish,
      log  = 'y',
      pch  = 19,
      col  = dfish$region ) 

lattice::xyplot( log_est_standard_length ~ open_water_day | region, data = dfish )

#--- Taille et carbone

plot( carbon_mg ~ est_standard_length,
      data = dfish,
      log  = 'xy',
      pch  = 19,
      col  = dfish$region ) 

cor.test( dfish$log_carbon_mg, dfish$log_est_standard_length )
## 
##  Pearson's product-moment correlation
## 
## data:  dfish$log_carbon_mg and dfish$log_est_standard_length
## t = 26.732, df = 337, p-value < 0.00000000000000022
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.7869183 0.8557199
## sample estimates:
##       cor 
## 0.8243398
#--- Taille et succès alimentaire

plot( feeding_success ~ est_standard_length,
      data = dfish,
      log  = 'xy',
      pch  = 19,
      col  = dfish$region ) 

abline( v   = 25,
        lty = 4,
        col = "red" )

cor.test( dfish$log_feeding_success, dfish$log_est_standard_length )
## 
##  Pearson's product-moment correlation
## 
## data:  dfish$log_feeding_success and dfish$log_est_standard_length
## t = 4.1572, df = 337, p-value = 0.00004091
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1171006 0.3198589
## sample estimates:
##       cor 
## 0.2208648
plot( feeding_success ~ carbon_mg, 
      data = dfish,
      log = 'xy',
      pch = 19,
      col = dfish$region ) 

cor.test( dfish$log_feeding_success, dfish$log_carbon_mg )
## 
##  Pearson's product-moment correlation
## 
## data:  dfish$log_feeding_success and dfish$log_carbon_mg
## t = 19.851, df = 337, p-value < 0.00000000000000022
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.6809144 0.7797242
## sample estimates:
##      cor 
## 0.734183
#--- Taille et condition des poissons

plot( fish_cond ~ est_standard_length,
      data = dfish,
      log  = 'x',
      pch  = 19,
      col  = dfish$region ) 

abline( v   = 25,
        lty = 4,
        col = "red" )

cor.test( dfish$fish_cond, dfish$log_est_standard_length )
## 
##  Pearson's product-moment correlation
## 
## data:  dfish$fish_cond and dfish$log_est_standard_length
## t = 0.56943, df = 337, p-value = 0.5694
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07576528  0.13707059
## sample estimates:
##       cor 
## 0.0310041
plot( feeding_success ~ fish_cond,
      data = dfish,
      log  = 'y',
      pch  = 19,
      col  = dfish$region ) 

cor.test( dfish$fish_cond, dfish$log_feeding_success )
## 
##  Pearson's product-moment correlation
## 
## data:  dfish$fish_cond and dfish$log_feeding_success
## t = 3.1815, df = 337, p-value = 0.001601
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.06543369 0.27232831
## sample estimates:
##       cor 
## 0.1707627
#faible corrélation entre FS et condition physique

 

La quantité de carbone ingérée est fortement corrélée à la taille des poissons (R = 0.8243398) !

La corrélation entre la taille des poissons et leur succès alimentaire est significative mais bien plus faible (R = 0.2208648) qu’entre la quantité de carbone ingérée et le succès alimentaire (R = cor(dfish$log_carbon_mg,dfish$log_feeding_success)).

Les plus grands poissons n’ont pas nécessairement une meilleure condition physique; la corrélation entre la condition et la taille n’est pas significative (R = 0.0310041).

La corrélation entre le succès alimentaire (mesure à court terme de l’alimentation des poissons) et la condition (mesure intégratrice de l’alimentation des poissons) des individus est significative mais très bruitée (R = 0.1707627).

 

Succès alimentaire et environnement

 

Explorations des données

 

On utilisera la variable log-transformée log_indstandard qui représente la densité de larves filtrées par les filets corrigé en fonction de la profondeur échantillonnée.

La variable NASC_zoo qui représente la concentration de mesozooplankton observée par méthodes acoustiques est problématique : les très fortes valeurs nuisent à des relations linéaires entre variables. On utilisera les valeurs log-transformées.

 

#--- Ajoute les valeurs log-transformées

dfish$log_indstandard <- log10( dfish$indstandard )
dfish$log_NASC_zoo    <- log10( dfish$NASC_zoo )


#--- Succès alimentaire et environnement

dfish %>% select( log_feeding_success,
                  log_indstandard,
                  sampling_day,
                  open_water_day,
                  surf_sal_kgm3,
                  surf_temp_degC,
                  log_NASC_zoo,
                  log_est_standard_length) %>% plot

# Corrélations avec les variables explicatives potentielles
rcorr( as.matrix( dfish[, c( "log_feeding_success",
                             "log_indstandard",
                             "sampling_day",
                             "open_water_day",
                             "surf_sal_kgm3",
                             "surf_temp_degC",
                             "log_NASC_zoo" ) ]
                 ) 
      )
##                     log_feeding_success log_indstandard sampling_day
## log_feeding_success                1.00           -0.10         0.13
## log_indstandard                   -0.10            1.00        -0.24
## sampling_day                       0.13           -0.24         1.00
## open_water_day                     0.29           -0.07         0.23
## surf_sal_kgm3                      0.20            0.35        -0.16
## surf_temp_degC                     0.04           -0.42         0.04
## log_NASC_zoo                       0.25           -0.09        -0.10
##                     open_water_day surf_sal_kgm3 surf_temp_degC log_NASC_zoo
## log_feeding_success           0.29          0.20           0.04         0.25
## log_indstandard              -0.07          0.35          -0.42        -0.09
## sampling_day                  0.23         -0.16           0.04        -0.10
## open_water_day                1.00          0.46           0.36         0.66
## surf_sal_kgm3                 0.46          1.00          -0.17         0.35
## surf_temp_degC                0.36         -0.17           1.00         0.49
## log_NASC_zoo                  0.66          0.35           0.49         1.00
## 
## n= 339 
## 
## 
## P
##                     log_feeding_success log_indstandard sampling_day
## log_feeding_success                     0.0602          0.0168      
## log_indstandard     0.0602                              0.0000      
## sampling_day        0.0168              0.0000                      
## open_water_day      0.0000              0.1837          0.0000      
## surf_sal_kgm3       0.0002              0.0000          0.0027      
## surf_temp_degC      0.4284              0.0000          0.4248      
## log_NASC_zoo        0.0000              0.1098          0.0702      
##                     open_water_day surf_sal_kgm3 surf_temp_degC log_NASC_zoo
## log_feeding_success 0.0000         0.0002        0.4284         0.0000      
## log_indstandard     0.1837         0.0000        0.0000         0.1098      
## sampling_day        0.0000         0.0027        0.4248         0.0702      
## open_water_day                     0.0000        0.0000         0.0000      
## surf_sal_kgm3       0.0000                       0.0017         0.0000      
## surf_temp_degC      0.0000         0.0017                       0.0000      
## log_NASC_zoo        0.0000         0.0000        0.0000
# Les corrélations significatives sont avec :
# -> open_water_day
# -> surf_sal_kgm3
# -> log_NASC_zoo

plot( feeding_success ~ est_standard_length,
      data = dfish,
      log  = 'xy',
      pch  = 19,
      col  = dfish$region ) 

lattice::xyplot( log_feeding_success ~ log_est_standard_length | region, data = dfish )

plot( feeding_success ~ open_water_day,
      data = dfish,
      log  = 'y',
      pch  = 19,
      col  = dfish$region ) 

lattice::xyplot( log_feeding_success ~ open_water_day | region, data = dfish )

plot( feeding_success ~ surf_sal_kgm3,
      data = dfish,
      log  = 'y',
      pch  = 19,
      col  = dfish$region ) 

lattice::xyplot( log_feeding_success ~ surf_sal_kgm3 | region, data = dfish )

plot( feeding_success ~ NASC_zoo,
      data = dfish,
      log  = 'xy',
      pch  = 19,
      col  = dfish$region ) 

lattice::xyplot( log_feeding_success ~ log_NASC_zoo | region, data = dfish )

 

Modèles de régression linéaire

#--- Vérifier que le modèle sans effet mixte respecte les conditions d'application de modélisation linéaire

# modèle avec toutes les variables explicatives
feed.best <- lm( log_feeding_success ~ log_est_standard_length +
                                       log_indstandard         +
                                       open_water_day          +
                                       surf_sal_kgm3           +
                                       surf_temp_degC          +
                                       log_NASC_zoo, 
                data = dfish )

# => meilleur modèle ne garde que log_est_standard_length & log_NASC_zoo
# => le R2 est un peu mieux qu'avec MS 2010 = 0.19 (vs. 0.12)
summary(feed.best)
## 
## Call:
## lm(formula = log_feeding_success ~ log_est_standard_length + 
##     log_indstandard + open_water_day + surf_sal_kgm3 + surf_temp_degC + 
##     log_NASC_zoo, data = dfish)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.59095 -0.23778  0.05452  0.29154  1.08071 
## 
## Coefficients:
##                          Estimate Std. Error t value             Pr(>|t|)    
## (Intercept)             -3.854220   0.315010 -12.235 < 0.0000000000000002 ***
## log_est_standard_length  0.414179   0.187752   2.206              0.02807 *  
## log_indstandard         -0.089499   0.036116  -2.478              0.01371 *  
## open_water_day           0.001227   0.001116   1.100              0.27227    
## surf_sal_kgm3            0.009589   0.009758   0.983              0.32648    
## surf_temp_degC          -0.043534   0.014645  -2.973              0.00317 ** 
## log_NASC_zoo             0.160263   0.058506   2.739              0.00649 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4264 on 332 degrees of freedom
## Multiple R-squared:  0.1354, Adjusted R-squared:  0.1197 
## F-statistic: 8.663 on 6 and 332 DF,  p-value: 0.000000009061
# Vérifie la colinéarité
car::vif(feed.best)
## log_est_standard_length         log_indstandard          open_water_day 
##                1.913353                1.408051                2.732693 
##           surf_sal_kgm3          surf_temp_degC            log_NASC_zoo 
##                1.819519                2.151535                2.441626
# Vérifie les conditions d'application
plot(feed.best)

#--- modèles mixtes linéraires

# Vérifie les relations par région
lattice::xyplot( log_feeding_success ~ log_indstandard         | region, data = dfish )

lattice::xyplot( log_feeding_success ~ log_est_standard_length | region, data = dfish )

lattice::xyplot( log_feeding_success ~ open_water_day          | region, data = dfish )

lattice::xyplot( log_feeding_success ~ surf_temp_degC          | region, data = dfish )

lattice::xyplot( log_feeding_success ~ log_NASC_zoo            | region, data = dfish )

# Supprime les régions "Amundsen Gulf Mouth" & "NEG" car PAS DE VARIANCE pour plusieurs variables !
dfish.LMER <- dfish %>% subset(., region!="Amundsen Gulf Mouth" & region!="NEG" )

# Modèle complet
fish.LMER.all <- lmerTest::lmer( log_feeding_success ~ log_est_standard_length +
                                                       log_indstandard         + 
                                                       surf_temp_degC          +
                                                       surf_sal_kgm3           +
                                                       open_water_day          +
                                                       log_NASC_zoo            +
                                                      (1| region/year),
                                 data = dfish.LMER )
summary(fish.LMER.all)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_feeding_success ~ log_est_standard_length + log_indstandard +  
##     surf_temp_degC + surf_sal_kgm3 + open_water_day + log_NASC_zoo +  
##     (1 | region/year)
##    Data: dfish.LMER
## 
## REML criterion at convergence: 358.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.7769 -0.4998  0.0690  0.6507  2.7532 
## 
## Random effects:
##  Groups      Name        Variance Std.Dev.
##  year:region (Intercept) 0.04478  0.2116  
##  region      (Intercept) 0.01585  0.1259  
##  Residual                0.14579  0.3818  
## Number of obs: 314, groups:  year:region, 26; region, 7
## 
## Fixed effects:
##                           Estimate Std. Error         df t value
## (Intercept)              -4.234753   0.449798 107.220955  -9.415
## log_est_standard_length   0.693317   0.202272 303.398679   3.428
## log_indstandard          -0.030695   0.068308  57.092441  -0.449
## surf_temp_degC           -0.012141   0.020324 124.048780  -0.597
## surf_sal_kgm3             0.014348   0.014414  95.422649   0.995
## open_water_day           -0.001997   0.002813  18.792069  -0.710
## log_NASC_zoo              0.265196   0.140782  20.734860   1.884
##                                    Pr(>|t|)    
## (Intercept)             0.00000000000000106 ***
## log_est_standard_length            0.000693 ***
## log_indstandard                    0.654872    
## surf_temp_degC                     0.551358    
## surf_sal_kgm3                      0.322050    
## open_water_day                     0.486337    
## log_NASC_zoo                       0.073701 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lg_s__ lg_nds srf__C srf__3 opn_w_
## lg_st_stnd_ -0.267                                   
## lg_ndstndrd  0.403  0.049                            
## srf_tmp_dgC -0.148 -0.311 -0.110                     
## srf_sl_kgm3 -0.834 -0.201 -0.242  0.208              
## open_wtr_dy  0.115 -0.197  0.249  0.010 -0.128       
## log_NASC_zo  0.015  0.136 -0.126 -0.264 -0.059 -0.685
performance::icc(fish.LMER.all)
## # Intraclass Correlation Coefficient
## 
##      Adjusted ICC: 0.294
##   Conditional ICC: 0.250
# => le groupement par région explique 22.4% de la variance du succès d'alimentation


plot_model( fish.LMER.all, 
            type = "diag" )
## Warning in checkMatrixPackageVersion(): Package version inconsistency detected.
## TMB was built with Matrix version 1.3.2
## Current Matrix version is 1.2.18
## Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package
## [[1]]
## `geom_smooth()` using formula 'y ~ x'

## 
## [[2]]
## [[2]]$`year:region`
## `geom_smooth()` using formula 'y ~ x'

## 
## [[2]]$region
## `geom_smooth()` using formula 'y ~ x'

## 
## 
## [[3]]

## 
## [[4]]
## `geom_smooth()` using formula 'y ~ x'

# => les conditions d'application de la régression linéaire sont parfaitement respectées

# Plot fixed effects
plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "fe", 
            terms = c("log_est_standard_length"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "fe", 
            terms = c("open_water_day"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "fe", 
            terms = c("surf_temp_degC"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "fe", 
            terms = c("log_NASC_zoo"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "fe", 
            terms = c("log_indstandard"), 
            show.data = TRUE )

# Plot random effect
plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "re", 
            terms = c("open_water_day","region"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "re", 
            terms = c("log_est_standard_length","region"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "re", 
            terms = c("surf_temp_degC","region"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "re", 
            terms = c("log_NASC_zoo","region"), 
            show.data = TRUE )

plot_model( fish.LMER.all, 
            type = "pred", 
            pred.type = "re", 
            terms = c("log_indstandard","region"), 
            show.data = TRUE )

 

Ajouter les régions comme effet aléatoire est plus rigoureux d’un point de vue de l’analyse de nos résultats, et cela permet de tenir compte de la variabilité de l’effet des variables explicatives sur le succès alimentaire selon les régions, en particulier de la densité de zooplancton observée par l’acoustique qui démontre des effets parfois inverses.

 

SANS MS 2010: Modèles de succès alimentaire

Modèles de régression linéaire

 

On va établir les modèles de régression linéaire multiples pour essayer d’expliquer la variabilité du succès alimentaire des poissons échantillonnés.

Nous utiliserons des modèles à effet mixtes aléatoires pour tenir compte de la forte hétérogénéité spatiale de notre échantillonnage.

 

#--- Simple stepwise multiple regression model selection
dfish_noMS2010 <- dfish %>% filter(dfish$region_year != "MS 2010") %>% droplevels(.$region_year)
# modèle avec ordonnée à l'origine seulement

# modèle avec toutes les variables explicatives
feed.best2 <- lm( log_feeding_success ~ log_est_standard_length +
                                       log_indstandard         +
                                       open_water_day          +
                                       surf_sal_kgm3           +
                                       surf_temp_degC          +
                                       log_NASC_zoo, 
                data = dfish_noMS2010 )

# => meilleur modèle ne garde que log_est_standard_length & log_NASC_zoo
# => le R2 est un peu mieux qu'avec MS 2010 = 0.19 (vs. 0.12)
summary(feed.best2)
## 
## Call:
## lm(formula = log_feeding_success ~ log_est_standard_length + 
##     log_indstandard + open_water_day + surf_sal_kgm3 + surf_temp_degC + 
##     log_NASC_zoo, data = dfish_noMS2010)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.60078 -0.22371  0.07024  0.24543  1.03758 
## 
## Coefficients:
##                           Estimate Std. Error t value             Pr(>|t|)    
## (Intercept)             -3.9559882  0.2986621 -13.246 < 0.0000000000000002 ***
## log_est_standard_length  0.6273897  0.1843155   3.404              0.00075 ***
## log_indstandard         -0.0523156  0.0348237  -1.502              0.13402    
## open_water_day          -0.0002987  0.0010819  -0.276              0.78268    
## surf_sal_kgm3            0.0049421  0.0092442   0.535              0.59329    
## surf_temp_degC          -0.0111335  0.0149034  -0.747              0.45559    
## log_NASC_zoo             0.2582985  0.0571453   4.520           0.00000875 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4013 on 316 degrees of freedom
## Multiple R-squared:  0.2022, Adjusted R-squared:  0.1871 
## F-statistic: 13.35 on 6 and 316 DF,  p-value: 0.0000000000001714
# Vérifie la colinéarité
car::vif(feed.best2)
## log_est_standard_length         log_indstandard          open_water_day 
##                1.875583                1.448976                2.835445 
##           surf_sal_kgm3          surf_temp_degC            log_NASC_zoo 
##                1.821450                1.745873                2.258117
# Vérifie les conditions d'application
plot(feed.best2)

 

Seulement l’abondance de larves, l’abondance de macrozooplancton révélée par l’acoustique et le nombre de jours depuis la débâcle des poissons explique 20 % de la variance observée (\(R^2\) = 0.1870858)

On va maintenant vérifier avec des modèles mixtes l’influence possible de l’hétérogénéité régionale.

 

dfish_noMS2010 <- dfish %>% filter(dfish$region_year != "MS 2010") %>% droplevels(.$region_year)
#--- modèles mixtes linéraires

# Vérifie les relations par région
lattice::xyplot( log_feeding_success ~ log_est_standard_length | region, data = dfish_noMS2010 )

lattice::xyplot( log_feeding_success ~ log_NASC_zoo            | region, data = dfish_noMS2010 )

# Supprime les régions "Amundsen Gulf Mouth" car PAS DE VARIANCE pour plusieurs variables !
dfish.LMER2 <- dfish_noMS2010 %>% subset(., region!="Amundsen Gulf Mouth")

# Modèle complet
fish.LMER.all2 <- lmerTest::lmer( log_feeding_success ~log_est_standard_length +
                                                       log_indstandard         +
                                                       open_water_day          +
                                                       surf_sal_kgm3           +
                                                       surf_temp_degC          +
                                                       log_NASC_zoo            +
                                                       (1 | region/year),
                                 data = dfish.LMER2 )
summary(fish.LMER.all2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_feeding_success ~ log_est_standard_length + log_indstandard +  
##     open_water_day + surf_sal_kgm3 + surf_temp_degC + log_NASC_zoo +  
##     (1 | region/year)
##    Data: dfish.LMER2
## 
## REML criterion at convergence: 333.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.9511 -0.5066  0.0627  0.6203  2.7770 
## 
## Random effects:
##  Groups      Name        Variance Std.Dev.
##  year:region (Intercept) 0.033446 0.1829  
##  region      (Intercept) 0.001482 0.0385  
##  Residual                0.137567 0.3709  
## Number of obs: 313, groups:  year:region, 26; region, 8
## 
## Fixed effects:
##                           Estimate Std. Error         df t value
## (Intercept)              -4.113665   0.392690  97.846104 -10.476
## log_est_standard_length   0.737639   0.199325 282.005943   3.701
## log_indstandard          -0.005047   0.052086  30.349709  -0.097
## open_water_day           -0.001772   0.001916  12.800452  -0.925
## surf_sal_kgm3             0.008514   0.012767  86.748468   0.667
## surf_temp_degC            0.005867   0.018483  80.066862   0.317
## log_NASC_zoo              0.286684   0.104812  21.406401   2.735
##                                     Pr(>|t|)    
## (Intercept)             < 0.0000000000000002 ***
## log_est_standard_length             0.000259 ***
## log_indstandard                     0.923451    
## open_water_day                      0.372105    
## surf_sal_kgm3                       0.506626    
## surf_temp_degC                      0.751734    
## log_NASC_zoo                        0.012267 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lg_s__ lg_nds opn_w_ srf__3 srf__C
## lg_st_stnd_ -0.312                                   
## lg_ndstndrd  0.407  0.123                            
## open_wtr_dy  0.173 -0.283  0.025                     
## srf_sl_kgm3 -0.826 -0.205 -0.325 -0.161              
## srf_tmp_dgC -0.092 -0.312  0.006  0.036  0.190       
## log_NASC_zo  0.108  0.201  0.089 -0.632 -0.168 -0.256
performance::icc(fish.LMER.all2)
## # Intraclass Correlation Coefficient
## 
##      Adjusted ICC: 0.202
##   Conditional ICC: 0.163
plot_model( fish.LMER.all2, 
            type = "diag" )
## [[1]]
## `geom_smooth()` using formula 'y ~ x'

## 
## [[2]]
## [[2]]$`year:region`
## `geom_smooth()` using formula 'y ~ x'

## 
## [[2]]$region
## `geom_smooth()` using formula 'y ~ x'

## 
## 
## [[3]]

## 
## [[4]]
## `geom_smooth()` using formula 'y ~ x'

# => les conditions d'application de la régression linéaire sont parfaitement respectées

performance::r2_nakagawa(fish.LMER.best2, by_group = TRUE)
## object 'fish.LMER.best2' not found
## [1] NA
# Plot fixed effects
plot_model( fish.LMER.all2, 
            type = "pred", 
            pred.type = "fe", 
            terms = c("log_est_standard_length"), 
            show.data = TRUE )

plot_model( fish.LMER.all2, 
            type = "pred", 
            pred.type = "fe", 
            terms = c("log_NASC_zoo"), 
            show.data = TRUE )

# Plot random effect
plot_model( fish.LMER.all2, 
            type = "pred", 
            pred.type = "re", 
            terms = c("log_est_standard_length","region"), 
            show.data = TRUE )

plot_model( fish.LMER.all2, 
            type = "pred", 
            pred.type = "re", 
            terms = c("log_NASC_zoo","region"), 
            show.data = TRUE )

fish.LMER.best2 <- lmerTest::lmer( log_feeding_success ~log_est_standard_length +
                                                        log_NASC_zoo            +
                                                       (1 | region/year),
                                 data = dfish.LMER2 )
summary(fish.LMER.best2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log_feeding_success ~ log_est_standard_length + log_NASC_zoo +  
##     (1 | region/year)
##    Data: dfish.LMER2
## 
## REML criterion at convergence: 306.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.9957 -0.4845  0.0618  0.6258  2.7431 
## 
## Random effects:
##  Groups      Name        Variance      Std.Dev.  
##  year:region (Intercept) 0.02948064164 0.17169928
##  region      (Intercept) 0.00000000576 0.00007589
##  Residual                0.13746613951 0.37076426
## Number of obs: 313, groups:  year:region, 26; region, 8
## 
## Fixed effects:
##                          Estimate Std. Error        df t value
## (Intercept)              -3.88056    0.20670 179.38030 -18.774
## log_est_standard_length   0.71190    0.17344 208.29715   4.104
## log_NASC_zoo              0.24096    0.06778  23.43365   3.555
##                                     Pr(>|t|)    
## (Intercept)             < 0.0000000000000002 ***
## log_est_standard_length            0.0000582 ***
## log_NASC_zoo                         0.00165 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lg_s__
## lg_st_stnd_ -0.972       
## log_NASC_zo  0.034 -0.172
performance::icc(fish.LMER.best2)
## # Intraclass Correlation Coefficient
## 
##      Adjusted ICC: 0.177
##   Conditional ICC: 0.142
plot_model( fish.LMER.best2, 
            type = "diag" )
## [[1]]
## `geom_smooth()` using formula 'y ~ x'

## 
## [[2]]
## [[2]]$`year:region`
## `geom_smooth()` using formula 'y ~ x'

## 
## [[2]]$region
## `geom_smooth()` using formula 'y ~ x'

## 
## 
## [[3]]

## 
## [[4]]
## `geom_smooth()` using formula 'y ~ x'

# => les conditions d'application de la régression linéaire sont parfaitement respectées

performance::r2_nakagawa(fish.LMER.best2, by_group = TRUE)
## # Explained Variance by Level
## 
## Level   |    R2
## ---------------
## Level 1 | 0.052
## year    | 0.423
## region  | 1.000

  # Question 2. FS ~ taxonomie des proies

On vérifie la relation entre le «feeding success» et la composition des proies.

Régression linéaires multiples

prey_matrix_comb2$log_feeding_success        <- log10( prey_matrix_comb2$feeding_success             )
prey_matrix_comb2$log_est_standard_length    <- log10( prey_matrix_comb2$est_standard_length         )
prey_matrix_comb2$log_appendicularia         <- log10( prey_matrix_comb2$appendicularia           +1 )
prey_matrix_comb2$log_calanus.glacialis.c    <- log10( prey_matrix_comb2$`calanus glacialis c`    +1 )
prey_matrix_comb2$log_calanus.sp.n           <- log10( prey_matrix_comb2$`calanus sp n`           +1 )
prey_matrix_comb2$log_cyclopoidae.sp.c       <- log10( prey_matrix_comb2$`cyclopoidae sp c`       +1 )
prey_matrix_comb2$log_egg                    <- log10( prey_matrix_comb2$egg                      +1 )
prey_matrix_comb2$log_other                  <- log10( prey_matrix_comb2$other                    +1 )
prey_matrix_comb2$log_other.calanoid.sp.c    <- log10( prey_matrix_comb2$`other calanoid sp c`    +1 )
prey_matrix_comb2$log_other.calanus.sp.c     <- log10( prey_matrix_comb2$`other calanus sp c`     +1 )
prey_matrix_comb2$log_other.copepodite.and.n <- log10( prey_matrix_comb2$`other copepodite and n` +1 )
prey_matrix_comb2$log_pseudocalanus.sp.c     <- log10( prey_matrix_comb2$`pseudocalanus sp c`     +1 )
prey_matrix_comb2$log_pseudocalanus.sp.n     <- log10( prey_matrix_comb2$`pseudocalanus sp n`     +1 )

rcorr( as.matrix( prey_matrix_comb2[, c( "log_feeding_success",
                             "log_appendicularia",
                             "log_calanus.glacialis.c",
                             "log_calanus.sp.n",
                             "log_other",
                             "log_egg",
                             "log_other.calanoid.sp.c",
                             "log_other.calanus.sp.c",
                             "log_other.copepodite.and.n",
                             "log_pseudocalanus.sp.c",
                             "log_pseudocalanus.sp.n",
                             "log_est_standard_length") ]
                 ) 
      )
##                            log_feeding_success log_appendicularia
## log_feeding_success                       1.00               0.09
## log_appendicularia                        0.09               1.00
## log_calanus.glacialis.c                   0.37               0.13
## log_calanus.sp.n                          0.44               0.17
## log_other                                 0.07               0.28
## log_egg                                   0.16               0.15
## log_other.calanoid.sp.c                   0.29               0.15
## log_other.calanus.sp.c                    0.40               0.01
## log_other.copepodite.and.n                0.03               0.14
## log_pseudocalanus.sp.c                    0.41               0.15
## log_pseudocalanus.sp.n                    0.25               0.16
## log_est_standard_length                   0.22               0.24
##                            log_calanus.glacialis.c log_calanus.sp.n log_other
## log_feeding_success                           0.37             0.44      0.07
## log_appendicularia                            0.13             0.17      0.28
## log_calanus.glacialis.c                       1.00             0.08      0.27
## log_calanus.sp.n                              0.08             1.00      0.06
## log_other                                     0.27             0.06      1.00
## log_egg                                       0.03             0.18      0.39
## log_other.calanoid.sp.c                       0.31             0.22      0.26
## log_other.calanus.sp.c                        0.55             0.03      0.14
## log_other.copepodite.and.n                    0.03             0.33      0.02
## log_pseudocalanus.sp.c                        0.45             0.41      0.28
## log_pseudocalanus.sp.n                       -0.06             0.72      0.01
## log_est_standard_length                       0.63             0.11      0.42
##                            log_egg log_other.calanoid.sp.c
## log_feeding_success           0.16                    0.29
## log_appendicularia            0.15                    0.15
## log_calanus.glacialis.c       0.03                    0.31
## log_calanus.sp.n              0.18                    0.22
## log_other                     0.39                    0.26
## log_egg                       1.00                    0.11
## log_other.calanoid.sp.c       0.11                    1.00
## log_other.calanus.sp.c       -0.05                    0.28
## log_other.copepodite.and.n    0.05                    0.06
## log_pseudocalanus.sp.c        0.28                    0.45
## log_pseudocalanus.sp.n        0.10                    0.18
## log_est_standard_length       0.18                    0.41
##                            log_other.calanus.sp.c log_other.copepodite.and.n
## log_feeding_success                          0.40                       0.03
## log_appendicularia                           0.01                       0.14
## log_calanus.glacialis.c                      0.55                       0.03
## log_calanus.sp.n                             0.03                       0.33
## log_other                                    0.14                       0.02
## log_egg                                     -0.05                       0.05
## log_other.calanoid.sp.c                      0.28                       0.06
## log_other.calanus.sp.c                       1.00                       0.05
## log_other.copepodite.and.n                   0.05                       1.00
## log_pseudocalanus.sp.c                       0.29                       0.17
## log_pseudocalanus.sp.n                      -0.11                       0.38
## log_est_standard_length                      0.58                       0.15
##                            log_pseudocalanus.sp.c log_pseudocalanus.sp.n
## log_feeding_success                          0.41                   0.25
## log_appendicularia                           0.15                   0.16
## log_calanus.glacialis.c                      0.45                  -0.06
## log_calanus.sp.n                             0.41                   0.72
## log_other                                    0.28                   0.01
## log_egg                                      0.28                   0.10
## log_other.calanoid.sp.c                      0.45                   0.18
## log_other.calanus.sp.c                       0.29                  -0.11
## log_other.copepodite.and.n                   0.17                   0.38
## log_pseudocalanus.sp.c                       1.00                   0.36
## log_pseudocalanus.sp.n                       0.36                   1.00
## log_est_standard_length                      0.43                  -0.05
##                            log_est_standard_length
## log_feeding_success                           0.22
## log_appendicularia                            0.24
## log_calanus.glacialis.c                       0.63
## log_calanus.sp.n                              0.11
## log_other                                     0.42
## log_egg                                       0.18
## log_other.calanoid.sp.c                       0.41
## log_other.calanus.sp.c                        0.58
## log_other.copepodite.and.n                    0.15
## log_pseudocalanus.sp.c                        0.43
## log_pseudocalanus.sp.n                       -0.05
## log_est_standard_length                       1.00
## 
## n= 339 
## 
## 
## P
##                            log_feeding_success log_appendicularia
## log_feeding_success                            0.0938            
## log_appendicularia         0.0938                                
## log_calanus.glacialis.c    0.0000              0.0181            
## log_calanus.sp.n           0.0000              0.0023            
## log_other                  0.2200              0.0000            
## log_egg                    0.0034              0.0053            
## log_other.calanoid.sp.c    0.0000              0.0056            
## log_other.calanus.sp.c     0.0000              0.9118            
## log_other.copepodite.and.n 0.6255              0.0088            
## log_pseudocalanus.sp.c     0.0000              0.0066            
## log_pseudocalanus.sp.n     0.0000              0.0033            
## log_est_standard_length    0.0000              0.0000            
##                            log_calanus.glacialis.c log_calanus.sp.n log_other
## log_feeding_success        0.0000                  0.0000           0.2200   
## log_appendicularia         0.0181                  0.0023           0.0000   
## log_calanus.glacialis.c                            0.1629           0.0000   
## log_calanus.sp.n           0.1629                                   0.2986   
## log_other                  0.0000                  0.2986                    
## log_egg                    0.5358                  0.0012           0.0000   
## log_other.calanoid.sp.c    0.0000                  0.0000           0.0000   
## log_other.calanus.sp.c     0.0000                  0.5914           0.0119   
## log_other.copepodite.and.n 0.6121                  0.0000           0.7424   
## log_pseudocalanus.sp.c     0.0000                  0.0000           0.0000   
## log_pseudocalanus.sp.n     0.2688                  0.0000           0.8319   
## log_est_standard_length    0.0000                  0.0416           0.0000   
##                            log_egg log_other.calanoid.sp.c
## log_feeding_success        0.0034  0.0000                 
## log_appendicularia         0.0053  0.0056                 
## log_calanus.glacialis.c    0.5358  0.0000                 
## log_calanus.sp.n           0.0012  0.0000                 
## log_other                  0.0000  0.0000                 
## log_egg                            0.0419                 
## log_other.calanoid.sp.c    0.0419                         
## log_other.calanus.sp.c     0.3414  0.0000                 
## log_other.copepodite.and.n 0.3525  0.2687                 
## log_pseudocalanus.sp.c     0.0000  0.0000                 
## log_pseudocalanus.sp.n     0.0539  0.0009                 
## log_est_standard_length    0.0010  0.0000                 
##                            log_other.calanus.sp.c log_other.copepodite.and.n
## log_feeding_success        0.0000                 0.6255                    
## log_appendicularia         0.9118                 0.0088                    
## log_calanus.glacialis.c    0.0000                 0.6121                    
## log_calanus.sp.n           0.5914                 0.0000                    
## log_other                  0.0119                 0.7424                    
## log_egg                    0.3414                 0.3525                    
## log_other.calanoid.sp.c    0.0000                 0.2687                    
## log_other.calanus.sp.c                            0.3952                    
## log_other.copepodite.and.n 0.3952                                           
## log_pseudocalanus.sp.c     0.0000                 0.0017                    
## log_pseudocalanus.sp.n     0.0381                 0.0000                    
## log_est_standard_length    0.0000                 0.0071                    
##                            log_pseudocalanus.sp.c log_pseudocalanus.sp.n
## log_feeding_success        0.0000                 0.0000                
## log_appendicularia         0.0066                 0.0033                
## log_calanus.glacialis.c    0.0000                 0.2688                
## log_calanus.sp.n           0.0000                 0.0000                
## log_other                  0.0000                 0.8319                
## log_egg                    0.0000                 0.0539                
## log_other.calanoid.sp.c    0.0000                 0.0009                
## log_other.calanus.sp.c     0.0000                 0.0381                
## log_other.copepodite.and.n 0.0017                 0.0000                
## log_pseudocalanus.sp.c                            0.0000                
## log_pseudocalanus.sp.n     0.0000                                       
## log_est_standard_length    0.0000                 0.3477                
##                            log_est_standard_length
## log_feeding_success        0.0000                 
## log_appendicularia         0.0000                 
## log_calanus.glacialis.c    0.0000                 
## log_calanus.sp.n           0.0416                 
## log_other                  0.0000                 
## log_egg                    0.0010                 
## log_other.calanoid.sp.c    0.0000                 
## log_other.calanus.sp.c     0.0000                 
## log_other.copepodite.and.n 0.0071                 
## log_pseudocalanus.sp.c     0.0000                 
## log_pseudocalanus.sp.n     0.3477                 
## log_est_standard_length
#corrélation entre taille c. glacialis c (0.63)
#corrélation entre taill c. spp c (0.58)

# modèle avec ordonnée à l'origine seulement
prey.int <- lm( log_feeding_success ~ 1, data = prey_matrix_comb2 )

# modèle avec toutes les variables explicatives
prey.all <- lm( log_feeding_success ~ log_est_standard_length*(log_other.calanus.sp.c + log_calanus.glacialis.c) +
                                      log_appendicularia         + 
                                      log_calanus.glacialis.c    +
                                      log_calanus.sp.n           + 
                                      log_cyclopoidae.sp.c       + 
                                      log_egg                    + 
                                      log_other                  + 
                                      log_other.calanoid.sp.c    + 
                                      log_other.calanus.sp.c     + 
                                      log_other.copepodite.and.n + 
                                      log_pseudocalanus.sp.c     + 
                                      log_pseudocalanus.sp.n, 
                data = prey_matrix_comb2 )

summary(prey.all)
## 
## Call:
## lm(formula = log_feeding_success ~ log_est_standard_length * 
##     (log_other.calanus.sp.c + log_calanus.glacialis.c) + log_appendicularia + 
##     log_calanus.glacialis.c + log_calanus.sp.n + log_cyclopoidae.sp.c + 
##     log_egg + log_other + log_other.calanoid.sp.c + log_other.calanus.sp.c + 
##     log_other.copepodite.and.n + log_pseudocalanus.sp.c + log_pseudocalanus.sp.n, 
##     data = prey_matrix_comb2)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.0923 -0.1879  0.0156  0.1920  1.5990 
## 
## Coefficients:
##                                                 Estimate Std. Error t value
## (Intercept)                                     -3.05006    0.22069 -13.821
## log_est_standard_length                         -0.29157    0.19571  -1.490
## log_other.calanus.sp.c                           0.96079    0.55236   1.739
## log_calanus.glacialis.c                          1.22094    0.58512   2.087
## log_appendicularia                               0.09214    0.08076   1.141
## log_calanus.sp.n                                 0.35414    0.05242   6.756
## log_cyclopoidae.sp.c                            -0.15581    0.04382  -3.556
## log_egg                                          0.11152    0.03568   3.126
## log_other                                       -0.02645    0.05248  -0.504
## log_other.calanoid.sp.c                          0.09910    0.05980   1.657
## log_other.copepodite.and.n                      -0.07198    0.05324  -1.352
## log_pseudocalanus.sp.c                           0.09802    0.04949   1.981
## log_pseudocalanus.sp.n                          -0.01337    0.04883  -0.274
## log_est_standard_length:log_other.calanus.sp.c  -0.35204    0.40736  -0.864
## log_est_standard_length:log_calanus.glacialis.c -0.70937    0.43110  -1.646
##                                                             Pr(>|t|)    
## (Intercept)                                     < 0.0000000000000002 ***
## log_est_standard_length                                     0.137262    
## log_other.calanus.sp.c                                      0.082912 .  
## log_calanus.glacialis.c                                     0.037702 *  
## log_appendicularia                                          0.254754    
## log_calanus.sp.n                                      0.000000000066 ***
## log_cyclopoidae.sp.c                                        0.000433 ***
## log_egg                                                     0.001935 ** 
## log_other                                                   0.614624    
## log_other.calanoid.sp.c                                     0.098465 .  
## log_other.copepodite.and.n                                  0.177295    
## log_pseudocalanus.sp.c                                      0.048480 *  
## log_pseudocalanus.sp.n                                      0.784503    
## log_est_standard_length:log_other.calanus.sp.c              0.388112    
## log_est_standard_length:log_calanus.glacialis.c             0.100835    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3392 on 324 degrees of freedom
## Multiple R-squared:  0.4658, Adjusted R-squared:  0.4428 
## F-statistic: 20.18 on 14 and 324 DF,  p-value: < 0.00000000000000022
# forward & backward stepwise regression
prey.best <- step( prey.int,
                   direction = 'both',
                   scope = formula(prey.all) )
## Start:  AIC=-533.74
## log_feeding_success ~ 1
## 
##                              Df Sum of Sq    RSS     AIC
## + log_calanus.sp.n            1   13.2476 56.554 -603.08
## + log_pseudocalanus.sp.c      1   11.6448 58.157 -593.61
## + log_other.calanus.sp.c      1   11.0177 58.784 -589.97
## + log_calanus.glacialis.c     1    9.8083 59.993 -583.07
## + log_other.calanoid.sp.c     1    5.9967 63.805 -562.19
## + log_pseudocalanus.sp.n      1    4.4494 65.352 -554.06
## + log_est_standard_length     1    3.4050 66.397 -548.69
## + log_egg                     1    1.7610 68.041 -540.40
## + log_appendicularia          1    0.5802 69.221 -534.57
## + log_cyclopoidae.sp.c        1    0.5310 69.271 -534.32
## <none>                                    69.802 -533.74
## + log_other                   1    0.3114 69.490 -533.25
## + log_other.copepodite.and.n  1    0.0494 69.752 -531.98
## 
## Step:  AIC=-603.08
## log_feeding_success ~ log_calanus.sp.n
## 
##                              Df Sum of Sq    RSS     AIC
## + log_other.calanus.sp.c      1   10.3309 46.223 -669.46
## + log_calanus.glacialis.c     1    8.2003 48.354 -654.19
## + log_pseudocalanus.sp.c      1    4.3782 52.176 -628.40
## + log_other.calanoid.sp.c     1    2.9028 53.651 -618.95
## + log_est_standard_length     1    2.1060 54.448 -613.95
## + log_other.copepodite.and.n  1    1.0663 55.488 -607.54
## + log_cyclopoidae.sp.c        1    0.5545 55.999 -604.42
## + log_pseudocalanus.sp.n      1    0.5294 56.025 -604.27
## + log_egg                     1    0.4900 56.064 -604.03
## <none>                                    56.554 -603.08
## + log_other                   1    0.1243 56.430 -601.83
## + log_appendicularia          1    0.0267 56.527 -601.24
## - log_calanus.sp.n            1   13.2476 69.802 -533.74
## 
## Step:  AIC=-669.46
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c
## 
##                              Df Sum of Sq    RSS     AIC
## + log_calanus.glacialis.c     1    1.7248 44.498 -680.36
## + log_cyclopoidae.sp.c        1    1.6516 44.571 -679.80
## + log_pseudocalanus.sp.c      1    1.3816 44.842 -677.75
## + log_other.copepodite.and.n  1    1.3420 44.881 -677.45
## + log_egg                     1    0.7877 45.435 -673.29
## + log_other.calanoid.sp.c     1    0.6886 45.534 -672.55
## <none>                                    46.223 -669.46
## + log_est_standard_length     1    0.2522 45.971 -669.32
## + log_appendicularia          1    0.0254 46.198 -667.65
## + log_pseudocalanus.sp.n      1    0.0124 46.211 -667.56
## + log_other                   1    0.0068 46.216 -667.51
## - log_other.calanus.sp.c      1   10.3309 56.554 -603.08
## - log_calanus.sp.n            1   12.5608 58.784 -589.97
## 
## Step:  AIC=-680.36
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c
## 
##                              Df Sum of Sq    RSS     AIC
## + log_cyclopoidae.sp.c        1    2.0476 42.451 -694.33
## + log_est_standard_length     1    1.4976 43.001 -689.96
## + log_other.copepodite.and.n  1    1.2758 43.222 -688.22
## + log_egg                     1    0.6501 43.848 -683.35
## + log_pseudocalanus.sp.c      1    0.5441 43.954 -682.53
## + log_other.calanoid.sp.c     1    0.3675 44.131 -681.17
## <none>                                    44.498 -680.36
## + log_other                   1    0.1577 44.341 -679.56
## + log_appendicularia          1    0.0006 44.498 -678.36
## + log_pseudocalanus.sp.n      1    0.0002 44.498 -678.36
## - log_calanus.glacialis.c     1    1.7248 46.223 -669.46
## - log_other.calanus.sp.c      1    3.8554 48.354 -654.19
## - log_calanus.sp.n            1   11.8392 56.337 -602.38
## 
## Step:  AIC=-694.33
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c + log_cyclopoidae.sp.c
## 
##                              Df Sum of Sq    RSS     AIC
## + log_egg                     1    1.5050 40.946 -704.56
## + log_pseudocalanus.sp.c      1    1.3338 41.117 -703.15
## + log_other.copepodite.and.n  1    0.6690 41.782 -697.71
## + log_other.calanoid.sp.c     1    0.5845 41.866 -697.03
## + log_est_standard_length     1    0.4669 41.984 -696.08
## <none>                                    42.451 -694.33
## + log_appendicularia          1    0.0652 42.385 -692.85
## + log_other                   1    0.0393 42.411 -692.64
## + log_pseudocalanus.sp.n      1    0.0005 42.450 -692.33
## - log_cyclopoidae.sp.c        1    2.0476 44.498 -680.36
## - log_calanus.glacialis.c     1    2.1208 44.571 -679.80
## - log_other.calanus.sp.c      1    4.2939 46.745 -663.66
## - log_calanus.sp.n            1   13.8868 56.337 -600.38
## 
## Step:  AIC=-704.56
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c + log_cyclopoidae.sp.c + log_egg
## 
##                              Df Sum of Sq    RSS     AIC
## + log_pseudocalanus.sp.c      1    0.8644 40.081 -709.80
## + log_est_standard_length     1    0.7559 40.190 -708.88
## + log_other.copepodite.and.n  1    0.5389 40.407 -707.05
## + log_other.calanoid.sp.c     1    0.4781 40.468 -706.54
## <none>                                    40.946 -704.56
## + log_other                   1    0.0437 40.902 -702.92
## + log_appendicularia          1    0.0281 40.918 -702.80
## + log_pseudocalanus.sp.n      1    0.0065 40.939 -702.62
## - log_egg                     1    1.5050 42.451 -694.33
## - log_calanus.glacialis.c     1    1.9898 42.935 -690.48
## - log_cyclopoidae.sp.c        1    2.9025 43.848 -683.35
## - log_other.calanus.sp.c      1    4.8045 45.750 -668.95
## - log_calanus.sp.n            1   13.2667 54.212 -611.42
## 
## Step:  AIC=-709.8
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c + log_cyclopoidae.sp.c + log_egg + 
##     log_pseudocalanus.sp.c
## 
##                              Df Sum of Sq    RSS     AIC
## + log_est_standard_length     1    0.8679 39.213 -715.22
## + log_other.copepodite.and.n  1    0.5256 39.556 -712.27
## <none>                                    40.081 -709.80
## + log_other.calanoid.sp.c     1    0.1976 39.884 -709.47
## + log_other                   1    0.0577 40.024 -708.28
## + log_appendicularia          1    0.0357 40.046 -708.10
## + log_pseudocalanus.sp.n      1    0.0163 40.065 -707.93
## - log_pseudocalanus.sp.c      1    0.8644 40.946 -704.56
## - log_calanus.glacialis.c     1    0.9593 41.041 -703.78
## - log_egg                     1    1.0357 41.117 -703.15
## - log_cyclopoidae.sp.c        1    3.4636 43.545 -683.70
## - log_other.calanus.sp.c      1    4.5162 44.597 -675.60
## - log_calanus.sp.n            1    9.8824 49.964 -637.09
## 
## Step:  AIC=-715.22
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c + log_cyclopoidae.sp.c + log_egg + 
##     log_pseudocalanus.sp.c + log_est_standard_length
## 
##                                                   Df Sum of Sq    RSS     AIC
## + log_est_standard_length:log_calanus.glacialis.c  1    1.1151 38.098 -723.00
## + log_est_standard_length:log_other.calanus.sp.c   1    0.7590 38.454 -719.84
## + log_other.copepodite.and.n                       1    0.4500 38.763 -717.13
## + log_other.calanoid.sp.c                          1    0.4203 38.793 -716.87
## <none>                                                         39.213 -715.22
## + log_appendicularia                               1    0.1306 39.083 -714.35
## + log_pseudocalanus.sp.n                           1    0.0508 39.163 -713.66
## + log_other                                        1    0.0044 39.209 -713.26
## - log_est_standard_length                          1    0.8679 40.081 -709.80
## - log_pseudocalanus.sp.c                           1    0.9764 40.190 -708.88
## - log_egg                                          1    1.2758 40.489 -706.36
## - log_calanus.glacialis.c                          1    1.6239 40.837 -703.46
## - log_cyclopoidae.sp.c                             1    1.9330 41.146 -700.91
## - log_other.calanus.sp.c                           1    5.3789 44.592 -673.64
## - log_calanus.sp.n                                 1    9.1366 48.350 -646.21
## 
## Step:  AIC=-723
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c + log_cyclopoidae.sp.c + log_egg + 
##     log_pseudocalanus.sp.c + log_est_standard_length + log_calanus.glacialis.c:log_est_standard_length
## 
##                                                   Df Sum of Sq    RSS     AIC
## + log_other.calanoid.sp.c                          1    0.3226 37.776 -723.88
## + log_other.copepodite.and.n                       1    0.2407 37.858 -723.15
## <none>                                                         38.098 -723.00
## + log_appendicularia                               1    0.1503 37.948 -722.34
## + log_est_standard_length:log_other.calanus.sp.c   1    0.0973 38.001 -721.86
## + log_pseudocalanus.sp.n                           1    0.0195 38.079 -721.17
## + log_other                                        1    0.0003 38.098 -721.00
## - log_pseudocalanus.sp.c                           1    0.6476 38.746 -719.28
## - log_calanus.glacialis.c:log_est_standard_length  1    1.1151 39.213 -715.22
## - log_egg                                          1    1.2055 39.304 -714.44
## - log_cyclopoidae.sp.c                             1    1.9936 40.092 -707.71
## - log_other.calanus.sp.c                           1    5.9671 44.065 -675.67
## - log_calanus.sp.n                                 1    9.1518 47.250 -652.02
## 
## Step:  AIC=-723.88
## log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c + log_cyclopoidae.sp.c + log_egg + 
##     log_pseudocalanus.sp.c + log_est_standard_length + log_other.calanoid.sp.c + 
##     log_calanus.glacialis.c:log_est_standard_length
## 
##                                                   Df Sum of Sq    RSS     AIC
## <none>                                                         37.776 -723.88
## + log_other.copepodite.and.n                       1    0.2183 37.557 -723.84
## + log_appendicularia                               1    0.1268 37.649 -723.02
## - log_other.calanoid.sp.c                          1    0.3226 38.098 -723.00
## + log_est_standard_length:log_other.calanus.sp.c   1    0.1147 37.661 -722.91
## - log_pseudocalanus.sp.c                           1    0.3913 38.167 -722.39
## + log_pseudocalanus.sp.n                           1    0.0352 37.740 -722.20
## + log_other                                        1    0.0035 37.772 -721.91
## - log_calanus.glacialis.c:log_est_standard_length  1    1.0174 38.793 -716.87
## - log_egg                                          1    1.2377 39.013 -714.95
## - log_cyclopoidae.sp.c                             1    1.9062 39.682 -709.19
## - log_other.calanus.sp.c                           1    5.7798 43.555 -677.62
## - log_calanus.sp.n                                 1    8.8388 46.614 -654.61
# Vérifie les résultats
summary(prey.best)
## 
## Call:
## lm(formula = log_feeding_success ~ log_calanus.sp.n + log_other.calanus.sp.c + 
##     log_calanus.glacialis.c + log_cyclopoidae.sp.c + log_egg + 
##     log_pseudocalanus.sp.c + log_est_standard_length + log_other.calanoid.sp.c + 
##     log_calanus.glacialis.c:log_est_standard_length, data = prey_matrix_comb2)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.07856 -0.19198  0.01784  0.19554  1.65451 
## 
## Coefficients:
##                                                 Estimate Std. Error t value
## (Intercept)                                     -3.08733    0.21174 -14.581
## log_calanus.sp.n                                 0.34310    0.03910   8.774
## log_other.calanus.sp.c                           0.48346    0.06814   7.095
## log_calanus.glacialis.c                          1.64981    0.47239   3.492
## log_cyclopoidae.sp.c                            -0.16706    0.04100  -4.074
## log_egg                                          0.11118    0.03386   3.283
## log_pseudocalanus.sp.c                           0.08900    0.04821   1.846
## log_est_standard_length                         -0.28094    0.18872  -1.489
## log_other.calanoid.sp.c                          0.09864    0.05885   1.676
## log_calanus.glacialis.c:log_est_standard_length -1.02451    0.34417  -2.977
##                                                             Pr(>|t|)    
## (Intercept)                                     < 0.0000000000000002 ***
## log_calanus.sp.n                                < 0.0000000000000002 ***
## log_other.calanus.sp.c                              0.00000000000799 ***
## log_calanus.glacialis.c                                     0.000544 ***
## log_cyclopoidae.sp.c                                0.00005785021997 ***
## log_egg                                                     0.001137 ** 
## log_pseudocalanus.sp.c                                      0.065779 .  
## log_est_standard_length                                     0.137538    
## log_other.calanoid.sp.c                                     0.094661 .  
## log_calanus.glacialis.c:log_est_standard_length             0.003129 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3389 on 329 degrees of freedom
## Multiple R-squared:  0.4588, Adjusted R-squared:  0.444 
## F-statistic: 30.99 on 9 and 329 DF,  p-value: < 0.00000000000000022
# => Le "meilleur" modèle conserve `calanus glacialis c`, `calanus sp n`, `other calanus sp c`, 
#    `cyclopoidae sp c`, egg, `pseudocalanus sp c`, `other copepodite and n`, `other calanoid sp c` & log_est_standard_length

# Vérifie la colinéarité
car::vif(prey.best)
##                                log_calanus.sp.n 
##                                        1.348368 
##                          log_other.calanus.sp.c 
##                                        1.742550 
##                         log_calanus.glacialis.c 
##                                       98.705060 
##                            log_cyclopoidae.sp.c 
##                                        1.593969 
##                                         log_egg 
##                                        1.184340 
##                          log_pseudocalanus.sp.c 
##                                        1.916362 
##                         log_est_standard_length 
##                                        3.060704 
##                         log_other.calanoid.sp.c 
##                                        1.365839 
## log_calanus.glacialis.c:log_est_standard_length 
##                                      107.339774
# Vérifie les conditions d'application
plot(prey.best)

 

Les caractéristiques taxonomiques des proies expliquent bien la variabilité du succès d’alimentation (\(R^2\) = 0.4440092).

 

Question 3. FS ~ caractéristiques des proies

 

On explore les relations possibles entre le succès alimentaire et la taille des proies, leur nombre et leur diversité.

 

#--- Succès alimentaire et taille des proies

prey_matrix_comb2$total_preys <- rowSums(dfish[,c(23:86)])
prey_matrix_comb2$shannon <- diversity(prey_matrix_comb2[,c(2:11)], index = "shannon")
# On ajoute les variables log-transformées
prey_matrix_comb2$log_prey_max_um    <- log10(prey_matrix_comb2$prey_max_um)
prey_matrix_comb2$log_prey_min_um    <- log10(prey_matrix_comb2$prey_min_um)
prey_matrix_comb2$log_prey_median_um <- log10(prey_matrix_comb2$prey_median_um)
prey_matrix_comb2$log_prey_range_um  <- log10(prey_matrix_comb2$prey_range_um)
prey_matrix_comb2$log_total_preys    <- log10(prey_matrix_comb2$total_preys)
prey_matrix_comb2$log_feeding_success <- log10(prey_matrix_comb2$feeding_success)
prey_matrix_comb2$log_est_standard_length <- log10(prey_matrix_comb2$est_standard_length)
# Nuages de point
prey_matrix_comb2 %>% select( log_feeding_success,
                  log_prey_max_um,
                  log_prey_min_um,
                  log_prey_median_um,
                  log_prey_range_um,
                  log_total_preys,
                  shannon) %>% plot

# Corrélations avec les variables explicatives potentielles
rcorr( as.matrix( prey_matrix_comb2[, c( "log_feeding_success",
                             "log_prey_max_um",
                             "log_prey_min_um",
                             "log_prey_median_um",
                             "log_prey_range_um",
                             "log_total_preys",
                             "shannon",
                             "log_est_standard_length") ]
                 ) 
      )
##                         log_feeding_success log_prey_max_um log_prey_min_um
## log_feeding_success                    1.00           -0.14           -0.04
## log_prey_max_um                       -0.14            1.00            0.16
## log_prey_min_um                       -0.04            0.16            1.00
## log_prey_median_um                    -0.18            0.58            0.48
## log_prey_range_um                     -0.14            0.99            0.06
## log_total_preys                       -0.16            0.03           -0.03
## shannon                                0.22           -0.12           -0.13
## log_est_standard_length                0.22           -0.20           -0.03
##                         log_prey_median_um log_prey_range_um log_total_preys
## log_feeding_success                  -0.18             -0.14           -0.16
## log_prey_max_um                       0.58              0.99            0.03
## log_prey_min_um                       0.48              0.06           -0.03
## log_prey_median_um                    1.00              0.54            0.00
## log_prey_range_um                     0.54              1.00            0.04
## log_total_preys                       0.00              0.04            1.00
## shannon                              -0.08             -0.10           -0.06
## log_est_standard_length              -0.09             -0.21           -0.07
##                         shannon log_est_standard_length
## log_feeding_success        0.22                    0.22
## log_prey_max_um           -0.12                   -0.20
## log_prey_min_um           -0.13                   -0.03
## log_prey_median_um        -0.08                   -0.09
## log_prey_range_um         -0.10                   -0.21
## log_total_preys           -0.06                   -0.07
## shannon                    1.00                    0.50
## log_est_standard_length    0.50                    1.00
## 
## n= 339 
## 
## 
## P
##                         log_feeding_success log_prey_max_um log_prey_min_um
## log_feeding_success                         0.0075          0.4818         
## log_prey_max_um         0.0075                              0.0030         
## log_prey_min_um         0.4818              0.0030                         
## log_prey_median_um      0.0007              0.0000          0.0000         
## log_prey_range_um       0.0077              0.0000          0.3091         
## log_total_preys         0.0025              0.5502          0.5353         
## shannon                 0.0000              0.0248          0.0140         
## log_est_standard_length 0.0000              0.0002          0.5924         
##                         log_prey_median_um log_prey_range_um log_total_preys
## log_feeding_success     0.0007             0.0077            0.0025         
## log_prey_max_um         0.0000             0.0000            0.5502         
## log_prey_min_um         0.0000             0.3091            0.5353         
## log_prey_median_um                         0.0000            0.9533         
## log_prey_range_um       0.0000                               0.5004         
## log_total_preys         0.9533             0.5004                           
## shannon                 0.1376             0.0571            0.2778         
## log_est_standard_length 0.1121             0.0001            0.1831         
##                         shannon log_est_standard_length
## log_feeding_success     0.0000  0.0000                 
## log_prey_max_um         0.0248  0.0002                 
## log_prey_min_um         0.0140  0.5924                 
## log_prey_median_um      0.1376  0.1121                 
## log_prey_range_um       0.0571  0.0001                 
## log_total_preys         0.2778  0.1831                 
## shannon                         0.0000                 
## log_est_standard_length 0.0000
# La seule corrélation non significative est avec log_prey_min_um
# Il y a colinéarité entre log_prey_max_um et log_prey_range_um
#la longueur standard est corrélée significativement avec qu'une seule variable mais la valeur est très faible et la mettre dans le modèle serait redondant

plot( feeding_success ~ prey_max_um,
      data = dfish,
      log  = 'xy',
      pch  = 19,
      col  = prey_matrix_comb2$region ) 

lattice::xyplot( log_feeding_success ~ log_prey_max_um | region, data = prey_matrix_comb2 )

plot( feeding_success ~ prey_median_um,
      data = prey_matrix_comb2 ,
      log  = 'xy',
      pch  = 19,
      col  = prey_matrix_comb2$region ) 

lattice::xyplot( log_feeding_success ~ log_prey_median_um | region, data = prey_matrix_comb2  )

plot( feeding_success ~ total_preys,
      data = prey_matrix_comb2 ,
      log  = 'xy',
      pch  = 19,
      col  = prey_matrix_comb2$region ) 

lattice::xyplot( log_feeding_success ~ log_total_preys | region, data = prey_matrix_comb2  )

plot( feeding_success ~ shannon,
      data = prey_matrix_comb2 ,
      log  = 'y',
      pch  = 19,
      col  = prey_matrix_comb2$region ) 

lattice::xyplot( log_feeding_success ~ shannon | region, data = prey_matrix_comb2  )

summary(lm(log_prey_median_um ~ log_est_standard_length, data = prey_matrix_comb2))
## 
## Call:
## lm(formula = log_prey_median_um ~ log_est_standard_length, data = prey_matrix_comb2)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.63389 -0.12507 -0.02565  0.10233  0.79911 
## 
## Coefficients:
##                         Estimate Std. Error t value            Pr(>|t|)    
## (Intercept)              2.61451    0.08617  30.343 <0.0000000000000002 ***
## log_est_standard_length -0.11240    0.07057  -1.593               0.112    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2217 on 337 degrees of freedom
## Multiple R-squared:  0.007472,   Adjusted R-squared:  0.004527 
## F-statistic: 2.537 on 1 and 337 DF,  p-value: 0.1121
summary(lm(log_total_preys~ log_est_standard_length, data = prey_matrix_comb2))
## 
## Call:
## lm(formula = log_total_preys ~ log_est_standard_length, data = prey_matrix_comb2)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.13576 -0.35732 -0.02354  0.33663  1.33294 
## 
## Coefficients:
##                         Estimate Std. Error t value            Pr(>|t|)    
## (Intercept)               1.8263     0.1886   9.682 <0.0000000000000002 ***
## log_est_standard_length  -0.2061     0.1545  -1.334               0.183    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4852 on 337 degrees of freedom
## Multiple R-squared:  0.005252,   Adjusted R-squared:  0.0023 
## F-statistic: 1.779 on 1 and 337 DF,  p-value: 0.1831
summary(lm(shannon ~ log_est_standard_length, data = prey_matrix_comb2)) #shannon augmente significativement avec la taille des poissons même si la correlation n'est pas très forte
## 
## Call:
## lm(formula = shannon ~ log_est_standard_length, data = prey_matrix_comb2)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.23930 -0.24366  0.01998  0.28472  0.85839 
## 
## Coefficients:
##                         Estimate Std. Error t value             Pr(>|t|)    
## (Intercept)              -0.4108     0.1461  -2.812              0.00521 ** 
## log_est_standard_length   1.2646     0.1196  10.572 < 0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3758 on 337 degrees of freedom
## Multiple R-squared:  0.249,  Adjusted R-squared:  0.2468 
## F-statistic: 111.8 on 1 and 337 DF,  p-value: < 0.00000000000000022
plot(shannon ~ est_standard_length, data = prey_matrix_comb2, log = "x")

mean(prey_matrix_comb2$prey_median_um[prey_matrix_comb2$region == "Amundsen Gulf Mouth"], na.rm = TRUE)
## [1] 214.95
mean(prey_matrix_comb2$prey_median_um[prey_matrix_comb2$region != "Amundsen Gulf Mouth"], na.rm = TRUE)
## [1] 353.6319
mean(gutcontent2$prey_length[gutcontent2$region == "Amundsen Gulf Mouth"], na.rm = TRUE)
## [1] 389.8753
mean(gutcontent2$prey_length[gutcontent2$region != "Amundsen Gulf Mouth"], na.rm = TRUE)
## [1] 362.2709
mean(prey_matrix_comb2$shannon[prey_matrix_comb2$region == "Amundsen Gulf Mouth"], na.rm = TRUE)
## [1] 1.577763
mean(prey_matrix_comb2$shannon[prey_matrix_comb2$region != "Amundsen Gulf Mouth"], na.rm = TRUE)
## [1] 1.104278
gutcontent2[which(gutcontent2$prey_length == max(prey_matrix_comb2$prey_max_um)),]
##             region station sampling_date year                    area larvae_id
## 1: Mackenzie Shelf      10    2010-08-16 2010 Western Canadian Arctic       321
##    standard_length height_anus preserved_standard_length preserved_height_anus
## 1:              31          NA                    30.978                  4.17
##    ventral_pigmentation comments date_gut_done      part prey_id cop_or_naup
## 1:                    N     <NA>    2019-08-07 intestine    vers        <NA>
##    stade prey_length prey_height is_it_fragment comments_on_gut_content
## 1:  <NA>       10426         596              N                    <NA>
##    dissected_by week_name    bu_date max_fluo prof_mel surf_sal_kgm3
## 1:           PC        23 2010-06-07     0.48        7      27.16917
##    surf_temp_degC max_sampling_depth indstandard NASC_zoo open_water_day
## 1:          8.669                 90  0.02206321 34.70379             70
##    unique_fish_id est_standard_length est_height_anus prey_id_nonstade
## 1:       2010-321                  31         4.70017             vers
##    prey_reass num_eggs_in_egg_sack diam_eggs_in_egg_sack carbon_ug carbon_mg
## 1:       vers                   NA                    NA  114.5306 0.1145306
##    prey_id_comb sampling_day initials region_year
## 1:        other          227       MS     MS 2010

 

Modèles de régression linéaire

 

On va établir les modèles de régression linéaire multiples pour essayer d’expliquer la variabilité du succes d’alimentation des poissons échantillonnés selon les propriétés de leur alimentation.

 

#--- Simple stepwise multiple regression model selection
# add diversity
# modèle avec ordonnée à l'origine seulement
size.int <- lm( log_feeding_success ~ 1, data = prey_matrix_comb2 )

# modèle avec toutes les variables explicatives
size.all <- lm( log_feeding_success ~ shannon +
                                      log_prey_max_um    +
                                      log_prey_median_um +
                                      log_total_preys,   
                data = prey_matrix_comb2 )

# forward & backward stepwise selection
size.best <- step( size.int,
                   direction = 'both',
                   scope = formula(size.all) )
## Start:  AIC=-533.74
## log_feeding_success ~ 1
## 
##                      Df Sum of Sq    RSS     AIC
## + shannon             1    3.3105 66.491 -548.21
## + log_prey_median_um  1    2.3678 67.434 -543.44
## + log_total_preys     1    1.8689 67.933 -540.94
## + log_prey_max_um     1    1.4671 68.335 -538.94
## <none>                            69.802 -533.74
## 
## Step:  AIC=-548.21
## log_feeding_success ~ shannon
## 
##                      Df Sum of Sq    RSS     AIC
## + log_prey_median_um  1    1.9496 64.541 -556.30
## + log_total_preys     1    1.5920 64.899 -554.42
## + log_prey_max_um     1    0.9937 65.497 -551.31
## <none>                            66.491 -548.21
## - shannon             1    3.3105 69.802 -533.74
## 
## Step:  AIC=-556.3
## log_feeding_success ~ shannon + log_prey_median_um
## 
##                      Df Sum of Sq    RSS     AIC
## + log_total_preys     1   1.59760 62.944 -562.79
## <none>                            64.541 -556.30
## + log_prey_max_um     1   0.05363 64.488 -554.58
## - log_prey_median_um  1   1.94965 66.491 -548.21
## - shannon             1   2.89235 67.434 -543.44
## 
## Step:  AIC=-562.79
## log_feeding_success ~ shannon + log_prey_median_um + log_total_preys
## 
##                      Df Sum of Sq    RSS     AIC
## <none>                            62.944 -562.79
## + log_prey_max_um     1   0.03633 62.907 -560.99
## - log_total_preys     1   1.59760 64.541 -556.30
## - log_prey_median_um  1   1.95526 64.899 -554.42
## - shannon             1   2.63440 65.578 -550.89
# Vérifie les résultats de la procédure sur la séléction des variables
show(size.best$anova)
##                   Step Df Deviance Resid. Df Resid. Dev       AIC
## 1                      NA       NA       338   69.80162 -533.7363
## 2            + shannon -1 3.310535       337   66.49108 -548.2081
## 3 + log_prey_median_um -1 1.949647       336   64.54143 -556.2968
## 4    + log_total_preys -1 1.597605       335   62.94383 -562.7938
# => meilleur modèle enlève log_prey_max_um
# => le R2 est faible = 0.11
summary(size.best)
## 
## Call:
## lm(formula = log_feeding_success ~ shannon + log_prey_median_um + 
##     log_total_preys, data = prey_matrix_comb2)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.33976 -0.23354  0.03324  0.29114  1.00544 
## 
## Coefficients:
##                    Estimate Std. Error t value         Pr(>|t|)    
## (Intercept)        -2.09158    0.28819  -7.258 0.00000000000276 ***
## shannon             0.20493    0.05473   3.744         0.000213 ***
## log_prey_median_um -0.34347    0.10647  -3.226         0.001380 ** 
## log_total_preys    -0.14177    0.04862  -2.916         0.003785 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4335 on 335 degrees of freedom
## Multiple R-squared:  0.09825,    Adjusted R-squared:  0.09017 
## F-statistic: 12.17 on 3 and 335 DF,  p-value: 0.0000001413
# Vérifie la colinéarité
car::vif(size.best)
##            shannon log_prey_median_um    log_total_preys 
##           1.010097           1.006577           1.003509
# Vérifie les conditions d'application
plot(size.best)

 

Les caractéristiques de taille et d’abondance des proies expliquent pas super bien la variabilité du succès d’alimentation (\(R^2\) = 0.0901714).

Le cas de MS 2010

plot(feeding_success ~ surf_temp_degC, col = region, data = dfish,
     log = "xy", pch = 19, colors)

station.CTD <- read.csv("/Users/pascalecaissy/Dropbox/MSc 2019-2020/station_list_PascaleCaissy_2021_01_16.csv", na.string = "")

test.CTD <- NULL

for(i in c(7:17)){
  vec.CTD <- c(strsplit(paste(station.CTD$CTD_data_file[i]), split =", "))[[1]]
  for (j in 1:length(vec.CTD)){
  file.dir.CTD <- paste("/Users/pascalecaissy/Dropbox/MSc 2019-2020/Data - CTD/int_I_need", strftime(station.CTD$sampling_date, format = "%Y")[i], vec.CTD[j], sep = "/")
      CTD <- read.table(file.dir.CTD, na.string = "NaN", skip = station.CTD$lines_to_skip[i], header = TRUE,stringsAsFactors = FALSE)
      CTD[1,] <- NA
      CTD <- apply(CTD, MARGIN = 2, as.numeric) %>% as.data.frame()
      
  plot(Pres ~ Dens, data = CTD, ylim = rev(c(0,100)), main = paste("Pycnocline of station", station.CTD$station[i]), type = "l")
  plot(Pres ~ O2, data = CTD, ylim = rev(c(0,100)), main = paste("O2 vertical profile of station", station.CTD$station[i]), type = "l")
  }
}


prof_melange <- function(x){
  x <- x[!(is.na(x$Temp)),]
  for(l in 2:nrow(x)){
    r <- range(x$Temp[1:l], na.rm = TRUE)
      if(abs(diff(as.numeric(r))) > 0.5) {
         return(as.numeric(x$Pres[l]))
      }
    l = l+1
  }
  return(l-1)
}

density_stations = NULL
for(i in 1:length(station.CTD$CTD_data_file)){
  print(paste("i =", i))
  vec.CTD <- c(strsplit(paste(station.CTD$CTD_data_file[i]), split =", "))[[1]]
  if(vec.CTD[1] == "NA"){
    test.CTD <- rbind(test.CTD, data.frame(station = station.CTD$station[i], sampling_date = station.CTD$sampling_date[i], max_fluo = NA, surf_sal_kgm3= NA, surf_temp_degC = NA, prof_mel = NA, cast_number = NA))
  } else{
    for (j in 1:length(vec.CTD)){
      file.dir.CTD <- paste("/Users/pascalecaissy/Dropbox/MSc 2019-2020/Data - CTD/int_I_need", strftime(station.CTD$sampling_date, format = "%Y")[i], vec.CTD[j], sep = "/")
      CTD <- read.table(file.dir.CTD, na.string = "NaN", skip = station.CTD$lines_to_skip[i], header = TRUE,stringsAsFactors = FALSE)
      CTD[1,] <- NA
      CTD <- apply(CTD, MARGIN = 2, as.numeric) %>% as.data.frame()
      #trouver la zone de mélange
      prof_melange(CTD)
      dens_initial <- CTD$Dens[CTD$Pres == min(CTD$Pres, na.rm = TRUE)+5 & !is.na(CTD$Pres)]
      dens_final <- CTD$Dens[CTD$Pres == z +10 & !is.na(CTD$Pres)]
      diff_dens <- dens_final - dens_initial
      density_stations <- rbind(density_stations, data.frame(station = station.CTD$station[i], sampling_date = station.CTD$sampling_date[i], region =station.CTD$region[i],  diff_dens = diff_dens))
      j = j+1
    }
  }
}

density_stations$MS2010vsOther <- ifelse(density_stations$region == "Mackenzie Shelf" &  format(as.Date(density_stations$sampling_date, format="%Y-%m-%d"),"%Y")==2010, "MS 2010", "Other")

dens_plot <- ggplot()+
  geom_boxplot(data = density_stations, aes(y=diff_dens, 
                                            x=as.factor(MS2010vsOther)))+
  gg_themePC+
  labs(x = "", y = "Density difference")

ggsave("/Users/pascalecaissy/Dropbox/MSc 2019-2020/dens_plot.jpg", plot = dens_plot, dpi = 500, width = 10, height = 10, bg = "transparent")

T_FS <- ggplot( data = dfish, aes(y = feeding_success, x = surf_temp_degC, col = region)) +
  labs(x = "Surface temperature (°C)", y = bquote('Feeding success (mg C mg'~W^-1~')'))+
  geom_point(size = 4)+
  gg_themePC+
  scale_y_log10()+
  scale_color_manual(values = colreg, name = "Region", labels = c("MS", "AGM", "CM", "LV", "PS", "LS", "NW", "WBB", "NEG"))

ggsave("/Users/pascalecaissy/Dropbox/MSc 2019-2020/T_FS.jpg", plot = T_FS, dpi = 500, width = 14, height = 10, bg = "transparent")


gutcontent2$MSvsOther <-ifelse(gutcontent2$region_year != "MS 2010", "other", "MS 2010")
#ggsave("/Users/pascalecaissy/Dropbox/MSc 2019-2020/preycomp_reg.jpg", plot = preycomp_reg, dpi = 500, width = 20, height = 8, bg = "transparent")
 freqtable2 <- as.data.frame(table(gutcontent2$prey_id_comb[gutcontent2$est_standard_length>=25], gutcontent2$MSvsOther[gutcontent2$est_standard_length>=25]))
freqtable2$Var1 <- ordered(freqtable2$Var1, levels = c("appendicularia", "egg", "other", "other copepodite and n", "cyclopoidae sp c", "other calanoid sp c", "pseudocalanus sp c", "pseudocalanus sp n", "calanus glacialis c", "other calanus sp c", "calanus sp n"))
# 
# 
 ggplot() +
   geom_bar(data =freqtable2, mapping = aes(fill=Var1, y=Freq, x=Var2), position="fill", stat="identity") +
   scale_fill_manual(values =colours_bar)
 

# 
carbon_input2 <- aggregate(carbon_mg ~ prey_id_comb + MSvsOther + unique_fish_id, data = gutcontent2, FUN = sum)
carbon_input3 <- aggregate(carbon_mg ~ prey_id_comb + MSvsOther, data = carbon_input2, FUN=mean)
 carbon_input3$prey_id_comb <- ordered(carbon_input3$prey_id_comb, levels = c("appendicularia", "egg", "other", "other copepodite and n", "cyclopoidae sp c", "other calanoid sp c", "pseudocalanus sp c", "pseudocalanus sp n", "calanus glacialis c", "other calanus sp c", "calanus sp n"))

carbon23 <- ggplot() +
  geom_bar(data =carbon_input3, mapping = aes(y=carbon_mg, x=MSvsOther, fill = prey_id_comb), stat="identity") + scale_fill_manual(name = "", values =colours_bar, labels = c("Appendicularia", 
                                                    "Egg", 
                                                    "Other prey types",
                                                    "Other copepodites / nauplii", 
                                                    "Cyclopoida",
                                                    "Calanoida",
                                                    expression(paste(italic("Pseudocalanus "), "spp.", sep = "")),
                                                    expression(paste(italic("Pseudocalanus "), "spp.  Nauplii", sep = "")),
                                                    expression(italic("Calanus glacialis")),
                                                    expression(paste(italic("Calanus "), "spp.", sep = "")), 
                                                    expression(paste(italic("Calanus "), "spp.  Nauplii", sep = ""))
                                                    ))+ 
  theme_classic() +
  theme(panel.background = element_rect(fill = "transparent"), # bg of the panel
        plot.background = element_rect(fill = "transparent", color = NA),
        axis.text.x = element_text(size=25),
        axis.text.y = element_text(size = 25), 
        legend.text = element_text(size = 28),
        legend.text.align = 0,
        axis.title = element_text(size = 25),
        legend.background = element_rect(fill=alpha('white', 0.4)),
        plot.title = element_text(size = 30, hjust = 0.5))+
   labs(x = "", y = "Mean ingested carbon (mg)")

ggsave("/Users/pascalecaissy/Dropbox/MSc 2019-2020/carbonMSvsOther.jpg", plot = carbon23, dpi = 500, width = 20, height = 13, bg = "transparent")

Figures

Section préliminaire.

PCA des régions-années, et relations entre l’environnement et l’abondance de zoo et de larves

 

PCA de la taille des proies, diversité, etc.

Carbone et taille

## 
## Call: quantreg::rq(formula = log_carbon_mg ~ log_est_standard_length, 
##     tau = 0.1, data = dfish)
## 
## tau: [1] 0.1
## 
## Coefficients:
##                         coefficients lower bd upper bd
## (Intercept)             -6.67075     -7.44650 -6.37354
## log_est_standard_length  3.74244      3.50789  4.34555
## 
## Call: quantreg::rq(formula = log_carbon_mg ~ log_est_standard_length, 
##     tau = 0.9, data = dfish)
## 
## tau: [1] 0.9
## 
## Coefficients:
##                         coefficients lower bd upper bd
## (Intercept)             -5.79752     -6.39998 -5.03386
## log_est_standard_length  3.95716      3.44051  4.46231

Question 1: FS ~ taille + environnement

Succès alimentaire ~ taille + environnement (variables dans modèles)

Question 2. FS ~ taxonomie

Barplots: Composition taxonomique diète

## Warning: Removed 2 rows containing missing values (geom_bar).
## Warning: Removed 22 rows containing missing values (geom_bar).
## Warning: Removed 2 rows containing missing values (geom_bar).

Succès et composition proies

Question 3. FS ~ caractéristiques proies

Succès et mesures proies

Données pour la métho (nombres)

CA_net_types <- readxl::read_excel("~/Dropbox/MSc 2019-2020/Data - Stomach content/bosa stomach content_2020_12_05.xlsx", 
    sheet = "selected cods") %>% filter(!is.na(total_preys))
str(CA_net_types)

table(CA_net_types$gear)
table(is.na(CA_net_types$standard_length), is.na(CA_net_types$height_anus))